package com.cdtye.itps.cms.mapper.defect;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cdtye.itps.cms.dao.defect.entity.JcwProblemDefectCategory;
import com.cdtye.itps.cms.dao.defect.vo.JcwProblemDefectCategoryVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface JcwProblemDefectCategoryMapper extends BaseMapper<JcwProblemDefectCategory> {
    IPage<Map<String,Object>> pageList(IPage page, @Param("vo") JcwProblemDefectCategoryVo vo);

    List<Map<String,Object>> getList(@Param("vo") JcwProblemDefectCategoryVo vo);

    List<Map<String,Object>> getDefectCategoryListByIdList(@Param("idList") List<String> idList);

    @Select("<script> select * " +
            "from JCW_PROBLEM_DEFECT_CATEGORY where category_code = #{categoryCode} and category_name = #{categoryName} </script>  " )
    List<JcwProblemDefectCategory> findCategoryInfo(@Param("categoryCode") String categoryCode, @Param("categoryName") String categoryName);
}
